package announcer;

import java.util.Map;

import constants.FileNodeConstants;

import multicast.MulticastCommsClient;

public class AnnouncerHandler implements Runnable {

	private Map commandLineParametermap;
	private MulticastCommsClient client;
	public AnnouncerHandler(Map commandLineParametermap) {
		this.commandLineParametermap = commandLineParametermap;
		client = new MulticastCommsClient();
	}

	public void run() {
		client.sendMessage("ANNOUNCEFS:"+client.getMyAddress().getHostName()+":HB|"+commandLineParametermap.get(FileNodeConstants.PARAM_HB_PORT)+":FU|"+commandLineParametermap.get(FileNodeConstants.PARAM_FU_PORT)+":FD|"+commandLineParametermap.get(FileNodeConstants.PARAM_FD_PORT)+":CP|"+commandLineParametermap.get(FileNodeConstants.PARAM_COMMAND_PORT)) ;
	}

}
